﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.util {
    import Engine.Classes.*;
    import flash.events.*;
    import Engine.Managers.*;
    import Events.*;
    import Classes.*;

    public class OptimizationConfig {

        public static const DEFAULT:String = "default";
        public static const OPTIMIZATION:String = "optimization";

        private static var m_optimizeMouse:Boolean = true;
        private static var m_optimizeCulling:Boolean = true;
        private static var m_showNPC:Boolean = true;
        private static var m_showCloud:Boolean = true;
        private static var m_enableDefCon:Boolean = true;
        private static var m_enableOptimization:Boolean = true;
        private static var m_enableItemLoading:Boolean = true;
        private static var m_optimizeRedraw:Boolean = true;
        private static var m_profile:String = DEFAULT;

        public static function get profile():String{
            return (m_profile);
        }
        public static function set profile(_arg1:String):void{
            m_profile = _arg1;
            if (_arg1 == DEFAULT){
                showNPC = true;
                showCloud = true;
                enableDefCon = true;
                enableAnimation = true;
                enableDefCon = true;
            } else {
                if (_arg1 == OPTIMIZATION){
                    showNPC = false;
                    showCloud = false;
                    enableDefCon = false;
                    enableAnimation = false;
                    enableDefCon = false;
                    Global.ui.addEventListener(FarmGameWorldEvent.SFX_CHANGED, onSfxChanged);
                    enableOptimization = !(SoundManager.isMuted());
                };
            };
        }
        private static function onSfxChanged(_arg1:Event):void{
            enableOptimization = !(SoundManager.isMuted());
        }
        public static function set enableOptimization(_arg1:Boolean):void{
            m_enableOptimization = _arg1;
            optimizeMouse = _arg1;
            optimizeCulling = _arg1;
            optimizeRedraw = _arg1;
            var _local2:IsoViewport = (GlobalEngine.viewport as IsoViewport);
            if (_local2){
                _local2.optimizeCulling = _arg1;
            };
        }
        public static function get enableOptimization():Boolean{
            return (m_enableOptimization);
        }
        public static function set optimizeRedraw(_arg1:Boolean):void{
            m_optimizeRedraw = _arg1;
        }
        public static function get optimizeRedraw():Boolean{
            return (m_optimizeRedraw);
        }
        public static function set enableItemLoading(_arg1:Boolean):void{
            m_enableItemLoading = _arg1;
        }
        public static function get enableItemLoading():Boolean{
            return (m_enableItemLoading);
        }
        public static function set optimizeMouse(_arg1:Boolean):void{
            m_optimizeMouse = _arg1;
        }
        public static function get optimizeMouse():Boolean{
            return (m_optimizeMouse);
        }
        public static function set optimizeCulling(_arg1:Boolean):void{
            m_optimizeCulling = _arg1;
        }
        public static function get optimizeCulling():Boolean{
            return (m_optimizeCulling);
        }
        public static function set showNPC(_arg1:Boolean):void{
            m_showNPC = _arg1;
            Global.world.citySim.npcManager.showNPC = _arg1;
        }
        public static function get showNPC():Boolean{
            return (m_showNPC);
        }
        public static function set showCloud(_arg1:Boolean):void{
            m_showCloud = _arg1;
            CloudManager.activated = _arg1;
        }
        public static function get showCloud():Boolean{
            return (CloudManager.activated);
        }
        public static function set enableDefCon(_arg1:Boolean):void{
            m_enableDefCon = _arg1;
        }
        public static function get enableDefCon():Boolean{
            return (m_enableDefCon);
        }
        public static function set forceDefConLevel(_arg1:int):void{
            Global.world.forceDefcon(_arg1);
        }
        public static function get forceDefConLevel():int{
            return (Global.world.defCon);
        }
        public static function set enableAnimation(_arg1:Boolean):void{
            Global.world.enableAnimations(_arg1);
        }
        public static function get enableAnimation():Boolean{
            return (Global.playAnimations);
        }
        public static function set stageQuality(_arg1:String):void{
            Global.stage.quality = _arg1;
        }
        public static function get stageQuality():String{
            return (Global.stage.quality);
        }
        public static function set fps(_arg1:int):void{
            Global.stage.frameRate = _arg1;
        }
        public static function get fps():int{
            return (Global.stage.frameRate);
        }

    }
}//package Classes.util 
